import { Layout, Menu } from 'antd';
import { MessageOutlined, LikeOutlined, StarOutlined } from '@ant-design/icons';
import styles from './index.less';
import logo from '../../assets/logo.svg';
import { Link, connect } from 'umi';
import RightContent from '@/components/GlobalHeader/WebRightContent';

const { Header, Content, Footer } = Layout;
class HeaderPage extends React.Component {
    constructor(props) {
        super(props)
        this.state = {
            loading: true,
            datas: [],
        }
    }
    render() {
        return (
            <Header style={{ position: 'fixed', zIndex: 1, width: '100%' }}>
                <div><img alt="logo" src={logo} className={styles.logo} /></div>
                <Menu theme="dark" mode="horizontal" defaultSelectedKeys={[this.props.SelectedKeys]}>
                    <Menu.Item key="1"><Link to="/web">Home</Link></Menu.Item>
                    <Menu.Item key="2"><Link to="/web">里里外外</Link></Menu.Item>
                    <Menu.Item key="3"><Link to="/web">组件市场</Link></Menu.Item>
                    <RightContent currentUser={this.props.currentUser}  />
                </Menu>
                
            </Header>
        )
    }
}

export default connect(({ user}) => ({
    currentUser: user.currentUser,
}))(HeaderPage);